<template>
  <div>
    <el-tree :data="data" :props="defaultProps" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: [
        {
          label: '一级',
          children: [
            {
              label: '一级1',
              children: [{ label: '一级1-1' }, { label: '一级1-2' }]
            },
            { label: '一级2' },
            { label: '一级3' }
          ]
        },
        {
          label: '二级',
          children: [{ label: '2-1', children: [{ label: '2-1-1' }] }]
        }
      ],
      defaultProps: {
        children: 'children',
        label: 'label'
      }
    }
  }
}
</script>

<style>

</style>
